<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">
<h:head>
	<script type="text/javascript"
		src="http://maps.google.com/maps/api/js?sensor=true" />
	<link href="css/style_teste.css" rel="stylesheet" type="text/css" />
	<script src="js/script_cadastro.js"></script>
	<title>Cadastro de Paradas</title>
</h:head>
<h:body>

	<ui:include src="topo.xhtml"></ui:include>
	<h:outputStylesheet library="css" name="default.css" />
	<p:growl id="mensagem" showDetail="true" showSummary="false"></p:growl>
	<div class="limitar">

		<div class="painel_direito">
			<p:gmap id="mapa" center="#{cadastrarParadaMB.posicao}" zoom="15"
				model="#{cadastrarParadaMB.polylineModel}" onPointClick="dlgLocal.show()"
				type="ROADMAP" style="width:750px;height:600px">
				<p:ajax event="pointSelect" listener="#{cadastrarParadaMB.novo}"
					update="formLocal" />
			</p:gmap>

			<p:dialog widgetVar="dlgLocal">
				<h:form id="formLocal">
					<p:focus for="desc" />
					<h:panelGrid columns="2" style="width:100%">
						<h:outputLabel for="desc" value="Descrição:" />
						<p:inputText id="desc" value="#{cadastrarParadaMB.parada.nome}" onkeypress="return VerificaNomeProprio(event);" />
					</h:panelGrid>
					<p:commandButton value="Gravar"
						actionListener="#{cadastrarParadaMB.gravar()}"
						oncomplete="dlgLocal.hide()" update=":mapa :mensagem" />
				</h:form>
			</p:dialog>
		</div>
	</div>
</h:body>
</html>